var tplLM = 
	'<div class="materialItem">'+
		'<div class="item-img"><img src="resources/images/mat_icon.png" width="50" height="50"></div>'+
		'<div style="float:left; width:83%;">'+
		'<div class="list-rec">'+
			'<span>Nro. Documento: {VBELN}&nbsp;&nbsp;&nbsp;/&nbsp;&nbsp;&nbsp;{KTABG}</span>'+
			'<br />'+
			'{NAME1}'+
		'</div>'+
		'<div class="list-reclamo">'+
			'<span>Material: {MATNR} &nbsp;&nbsp;-&nbsp;&nbsp;{MAKTX}</span>'+
			'<br />'+
			'<span>{STAT}</span>'+
		'</div>'+
		'</div>'+
	'</div>';

listaReclamoView = Ext.extend(Ext.Panel, 
{
	fullscreen: true,
	layout: 'card',
		
	initComponent: function() 
	{
		this.listaREC = new Ext.List(
		{
			id: 'listaREC',
			itemTpl: tplLM,
			loadingText: false,
			store: listaReclamoStore,
			listeners: {
				itemtap: function (listaREC, index, element, event) {
					var record = listaREC.getRecord(element);
				}
			}
	    });
		
		this.crearDocPanel = new Ext.Panel(
        {
			layout: 'fit',
			dockedItems: [
            {
				xtype: 'toolbar',
				title: 'Lista de Reclamos',
            	dock: 'top',
            	items: [
            	{
            		ui: 'back',
					text: 'Volver',
					iconCls: 'reply',
					iconMask: true,
					scope: this,
					handler: function()
					{
						this.ownerCt.setActiveItem(this.prevCard,
						{
							type: 'slide',
							reverse: true,
							scope: this
						});
        			}
				},
				{
					xtype: 'spacer'
				},
				{
					ui: 'confirm',
					text: 'Ver',
					iconCls: 'action',
					iconMask: true,
					handler: function()
					{
						window.open("reclamo.html","_self");
					}
				}]
			}],
			items: this.listaREC
		});		
        
        this.items = this.crearDocPanel;
        listaReclamoView.superclass.initComponent.call(this);
	}
});

Ext.reg('listaReclamoView', listaReclamoView);